package com.ccb.modelbean;

import java.util.HashMap;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.ccb.afm.util.CodingFactory;
import com.ccb.afm.util.LoginTool;

import cn.tworen.demou.remoting.AmfMessage;
import cn.tworen.demou.remoting.Body;

/**
 * 建筑材料数量,价格，所剩余额
 * @author Administrator
 *
 */
public class Materials {
	
	private static Log log = LogFactory.getLog(Materials.class);
	
	public static Materials  getMaterials(AmfMessage amf)
	{
		Materials materials=new Materials();
		
		HashMap body=(HashMap)amf.getBodies().get(0).getValue();
		materials.cement=(CodingFactory.getIvalue("cement", body));
		materials.steel=(CodingFactory.getIvalue("steel", body));
		materials.decorative=(CodingFactory.getIvalue("decorative", body));
		materials.game_coin=(CodingFactory.getFvalue("game_coin", body));
		materials.steel_price=(CodingFactory.getFvalue("steel_price", body));
		materials.cement_price=(CodingFactory.getFvalue("cement_price", body));
		materials.decorative_price=(CodingFactory.getFvalue("decorative_price", body));
	
		return materials;
	}
	
	public int getCement() {
		return cement;
	}
	public void setCement(int cement) {
		this.cement = cement;
	}
	public int getSteel() {
		return steel;
	}
	public void setSteel(int steel) {
		this.steel = steel;
	}
	public int getDecorative() {
		return decorative;
	}
	public void setDecorative(int decorative) {
		this.decorative = decorative;
	}
	public float getGame_coin() {
		return game_coin;
	}
	public void setGame_coin(float game_coin) {
		this.game_coin = game_coin;
	}
	public float getSteel_price() {
		return steel_price;
	}
	public void setSteel_price(float steel_price) {
		this.steel_price = steel_price;
	}
	public float getCement_price() {
		return cement_price;
	}
	public void setCement_price(float cement_price) {
		this.cement_price = cement_price;
	}
	public float getDecorative_price() {
		return decorative_price;
	}
	public void setDecorative_price(float decorative_price) {
		this.decorative_price = decorative_price;
	}
	
	public int cement;
	public int steel;
	public int decorative;
	public float game_coin;
	public float steel_price;
	public float cement_price;
	public float decorative_price;
	

}
